{|if $errors|}
    {|foreach from=$errors item=e|}
        {|if $e == 'title'|}Empty title!<br />{|/if|}
        {|if $e == 'preview'|}Empty preview!<br />{|/if|}
        {|if $e == 'content'|}Empty content!<br />{|/if|}
    {|/foreach|}
{|/if|}
{|if $message == 'ok'|}
    <script type="text/javascript">window.location = "/controlpanel/annoncements/"</script>
{|/if|}
{|if $message != 'ok'|}
<form method="post">
    <table class="utable">
        <tr>
            <td class="lef">Заголовок: </td>
            <td><input type="text" style="width:100%;" name="title" value="{|$control_title|}" /></td>
        </tr>
        <tr>
            <td class="lef">Скорочено: </td>
            <td>
                <textarea id="pcontent" style="width:100%;height:200px;" name="preview">{|$control_preview|}</textarea>
            <!--    <script type="text/javascript" src="/packages/CKEditor/ckeditor/ckeditor.js"></script>
                <script type="text/javascript">
                    CKEDITOR.replace('pcontent', {
                        filebrowserBrowseUrl : '/packages/CKFinder/ckfinder/ckfinder.html',
                        filebrowserImageBrowseUrl : '/packages/CKFinder/ckfinder/ckfinder.html?Type=Images',
                        filebrowserFlashBrowseUrl : '/packages/CKFinder/ckfinder/ckfinder.html?Type=Flash',
                        filebrowserUploadUrl : '/packages/CKFinder/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
                        filebrowserImageUploadUrl : '/packages/CKFinder/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
                        filebrowserFlashUploadUrl : '/packages/CKFinder/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'
                    });
                </script> -->
            </td>
        </tr>
        <tr>
            <td class="lef">Оголошення: </td>
            <td>
                <textarea id="pcontent1" style="width:100%; height:600px;" name="content">{|$control_content|}</textarea>
               <!-- <script type="text/javascript" src="/packages/CKEditor/ckeditor/ckeditor.js"></script>
                <script type="text/javascript">
                    CKEDITOR.replace('pcontent1', {
                        filebrowserBrowseUrl : '/packages/CKFinder/ckfinder/ckfinder.html',
                        filebrowserImageBrowseUrl : '/packages/CKFinder/ckfinder/ckfinder.html?Type=Images',
                        filebrowserFlashBrowseUrl : '/packages/CKFinder/ckfinder/ckfinder.html?Type=Flash',
                        filebrowserUploadUrl : '/packages/CKFinder/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
                        filebrowserImageUploadUrl : '/packages/CKFinder/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
                        filebrowserFlashUploadUrl : '/packages/CKFinder/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'
                    });
                </script> -->
            </td>
        </tr>
    </table>
    <input type="submit" class="button" name="add" value="Add" />
</form>
{|/if|}